#ifndef __KEY_H__
#define __KEY_H__

#include "stm32f4xx.h"
#include "led.h"
#include "delay.h"

#define KEY1_PIN GPIO_Pin_2
#define KEY2_PIN GPIO_Pin_3
#define KEY3_PIN GPIO_Pin_4
#define KEY4_PIN GPIO_Pin_5
#define KEY_GROUP GPIOG
#define RCC_KEY_GROUP RCC_AHB1Periph_GPIOG

extern void key_init(void);
extern void key_led(void);
extern void key_input_password(void);
extern void key_control(void);
extern void key_change_speed(void);

extern uint8_t led_speed_mode;
extern uint8_t led_water_mode;
extern uint8_t led_manual_light_num;
extern uint8_t if_password_correct;

#endif
